<!-- <template>
  <div class="photo-detail">
    <el-card>
      <img :src="imageUrl" class="image" />
      <div style="padding: 14px">
        <h3>{{ title }}</h3>
        <p>{{ description }}</p>
        <div class="bottom card-header">
          <div class="time">上传时间: {{ currentDate }}</div>
        </div>
      </div>
    </el-card>
  </div>
</template>

<script setup>
import { ref, onMounted } from 'vue'
import { useRoute } from 'vue-router'

const route = useRoute()

const imageUrl = ref('')
const title = ref('')
const description = ref('')
const currentDate = ref('')

onMounted(() => {
  const id = route.params.id
  // 根据 id 获取图片的详细信息
  // 这里可以使用 API 请求或其他方式获取数据
  // 示例数据
  imageUrl.value = 'https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png'
  title.value = '示例图片'
  description.value = '这是一个示例图片的详细描述。'
  currentDate.value = '2023-01-01'
})
</script>

<style scoped>
.photo-detail {
  padding: 20px;
}

.image {
  width: 100%;
  display: block;
}

.bottom {
  margin-top: 13px;
  line-height: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.time {
  font-size: 12px;
  color: #999;
}
</style> -->